package com.repair.worker.pojo.convertor;

import com.repair.api.user.response.data.UserInfo;
import com.repair.api.worker.response.data.WorkerInfo;
import com.repair.worker.pojo.entity.Worker;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;

/**
 * @author chunyu
 * @since 2024/11/5,20:39
 */
@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface WorkerConvertor {

    WorkerConvertor INSTANCE = org.mapstruct.factory.Mappers.getMapper(WorkerConvertor.class);

    /**
     * worker 转换为 WorkerInfo
     * @param worker worker
     * @return
     */
    WorkerInfo mapToVo(Worker worker);
}
